<?php echo CYui::init(true, true); ?>
<h2>Rich Text Editor Demo</h2>
<br><br>
<div class="yiiForm">
    <?php echo CHtml::beginForm(); ?>
    <div>
        <?php echo CYui::editor('editor1', $text1, null, '250px', '500px'); ?>
        <br><br>
        <?php echo CYui::simpleEditor('editor2', $text2, null, '250px', '500px', true); ?>
    </div>
    <br><br>
    <div class="action">
        <?php echo CHtml::submitButton('Post'); ?>
    </div>
    <?php echo CHtml::endForm(); ?>
</div><!-- yiiForm -->
<br><br>
<table class="dataGrid">
    <tr>
        <th colspan="4"><h3>Editor,<br>simpleEditor</h3></th>
    </tr>
    <tr>
        <th>Param</th>
        <th>Type</th>
        <th>Description</th>
        <th>Required / default</th>
    </tr>
    <tr>
        <td><b>$id</b></td>
        <td>string</td>
        <td>DOM name</td>
        <td align="center">+</td>
    </tr>
    <tr>
        <td><b>$data</b></td>
        <td>string</td>
        <td>textarea content</td>
        <td align="center">null</td>
    </tr>
    <tr>
        <td><b>$ajaxSaveUrl</b></td>
        <td>string</td>
        <td>ajax save data url </td>
        <td align="center">-</td>
    </tr>
    <tr>
        <td><b>$height</b></td>
        <td>string</td>
        <td>editor height</td>
        <td align="center">`250px`</td>
    </tr>
    <tr>
        <td><b>$width</b></td>
        <td>string</td>
        <td>editor width</td>
        <td align="center">`500px`</td>
    </tr>
    <tr>
        <td><b>$autoHeight</b></td>
        <td>boolean</td>
        <td>resize editor for big content</td>
        <td align="center">false</td>
    </tr>
    <tr>
        <td colspan="4" align="center">
            <?php echo CYui::codeHighlight(' echo CYui::editor(`editor1`, $text1, null, `250px`, `500px`);', 'php'); ?>
        </td>
    </tr>
</table>
<br>
